﻿using System;
using System.Collections.Generic;
 
using System.Text;
using System.IO;

namespace GGSharp.Structures
{
    public class MessageImageReplyFirst : MessageImageReplyNext
    {
        public MessageImageReplyFirst() { }
        public MessageImageReplyFirst(BinaryReader reader) : base(reader) { }

        public override void Read(System.IO.BinaryReader reader)
        {
            _size = reader.ReadInt32();
            _crc32 = reader.ReadInt32();

            ReadedLength += 8;
            if (ReadedLength < Length)
            {
                _filename = ReadCP1250Text(reader);
                _image = reader.ReadBytes(_size);

                ReadedLength += _size + _filename.Length + 1;
            }
        }

        public override void Write(System.IO.BinaryWriter writer)
        {
            throw new NotImplementedException();
        }
    }
}
